package example.service.impl;

import example.dao.AdminuserDao;
import example.entity.Adminuser;
import example.service.AdminuserService;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;

import javax.annotation.Resource;

@Service
public class AdminuserServiceImpl implements AdminuserService {

    @Resource
    AdminuserDao adminuserDao;
    @Override
    public Adminuser geAdminUser(Adminuser adminuser) {
        String pass = DigestUtils.md5DigestAsHex(adminuser.getAdupwd().getBytes());
        System.out.println(pass);
        adminuser.setAdupwd(pass);
        return  adminuserDao.geAdminUser(adminuser) ;}
}